import constants as con
import pygame

class InstructionsBG(pygame.sprite.Sprite):
    image = None

    def __init__(self,parent):
        pygame.sprite.Sprite.__init__(self)

        if InstructionsBG.image is None:
            InstructionsBG.image  = con.load_image('instructions2.png')

        self.parent = parent
        self.sprites = parent.sprites

        self.width = con.window_size[0]
        self.height = con.window_size[1]

        self.image = pygame.transform.scale(InstructionsBG.image, (self.width, self.height))

        self.rect = pygame.Rect(0,0,self.width,self.height)

        self.sprites.add(self)

    def purge(self):
        self.sprites.remove(self)
                                            
